import React from 'react';
import { Row, Col } from 'antd';
import { enquireScreen, unenquireScreen } from 'enquire-js';

let isMobile;
enquireScreen(b => {
  isMobile = b;
});

export default class SalesNetwork extends React.PureComponent {

  state = {
    isMobile,
  };

  componentDidMount() {
    this.enquireHandler = enquireScreen(mobile => {
      this.setState({
        isMobile: mobile,
      });
    });
  }

  componentWillUnmount() {
    unenquireScreen(this.enquireHandler);
  }

  render() {
    return (
      <Row>
        <Col span={24}><div className={isMobile ? "netM":"net"} /></Col>
      </Row>
    );
  }

}
